package com.zone.sdk.common.http.base;

import java.io.Serializable;
import java.util.Map;

public class Result<T> implements Serializable {

    private static final String RESULT_CODE_OK = "200";
    private static final long serialVersionUID = 8997575716875091530L;

    protected String requestId;

    protected int code = 200;

    protected String resultMsg;

    protected int total;

    protected T data;

    //AppStore
    protected String resultCode = "200";

    //mock
    protected String message;
    protected String resultMessage;
    protected String protocol;
    protected String contentType;
    protected Map<String, String> header;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(String resultMessage) {
        this.resultMessage = resultMessage;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = header;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", resultMsg='" + resultMsg + '\'' +
                ", resultCode='" + resultCode + '\'' +
                ", message='" + message + '\'' +
                ", resultMessage='" + resultMessage + '\'' +
                '}';
    }
}
